﻿using System;

namespace Multiprocessing.Core.Algorithm
{
    public sealed class AlgorithmResult
    {
        #region Properties

        public object Result { get; private set; }

        public TimeSpan ElapsedTime { get; private set; }

        public double ElapsedMemory { get; private set; }

        #endregion

        #region Constructors

        public AlgorithmResult(object result, TimeSpan elapsedTime, double elapsedMemory)
        {
            this.Result = result;
            this.ElapsedMemory = elapsedMemory;
            this.ElapsedTime = elapsedTime;
        }

        #endregion
    }

    public sealed class AlgorithmResult<T>
    {
        #region Properties
        
        public T Result { get; private set; }

        public TimeSpan ElapsedTime { get; private set; }

        public double ElapsedMemory { get; private set; }

        #endregion

        #region Constructors

        public AlgorithmResult(T result, TimeSpan elapsedTime, double elapsedMemory)
        {
            this.Result = result;
            this.ElapsedMemory = elapsedMemory;
            this.ElapsedTime = elapsedTime;
        }

        #endregion
    }
}
